package net.plankton.controller;

import java.util.HashMap;
import java.util.Map;

import net.plankton.mjpeg.MJpegProtocol;

public class Controller {

	
	private static Map<String, Protocol> protocols = new HashMap<String, Protocol>();
	
	public static Protocol resolveProtocol(String protocol) {
		return protocols.get(protocol);
	}
	
	public static void registerProtocol(Protocol p) {
		protocols.put(p.getName(), p);
	}
	
	/**
	 * @param args
	 */
	public static void main(String[] args) {
		registerProtocol(new MJpegProtocol());
		new Thread(new NetReader(6666)).start();

	}

}
